<?php 
if(empty($_SESSION['spelerId']) && isset($_COOKIE['inloggen']) && str_replace("&", "^", $_SERVER['REQUEST_URI']) <> "/session_functions/uitloggen.php") {
	//header("Location: http://mobile.mijnhonkbal.nl/session_functions/inloggen.php?cookie=1&target=".str_replace("&", "^", $_SERVER['REQUEST_URI']));
	die();
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Mobiel</title>
<!-- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -->
<meta name="viewport" content="width=device-width" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="icon" href="/images/icon.png" />
<link rel="shortcut icon" href="/images/icon.png" />
<link rel="apple-touch-icon" href="/images/icon_57.png"/>
<link rel="apple-touch-icon-precomposed" href="/images/icon_57.png"/>
<link rel="apple-touch-startup-image" href="/images/start_up.png">

<?php
//Style_nmr bepalen als dat nog niet gedaan is
if(empty($style_nmr)) {
	$style_nmr = (isset($_SESSION['style']) && $_SESSION['style'] > 1 ? $_SESSION['style'] : "");
}
if($page <> 'Activiteiten2') {
	$style_nmr = '';
}
$style_nmr = '3';
//Main CSS file laden
echo "<link href='/bestanden/css/iphone".$style_nmr.".css' rel='stylesheet' type='text/css' />";
//Jquery laden
echo "<script type='text/javascript' src='/bestanden/js/jquery-1.7.1.min.js'></script>";
//Extra bestanden of codes uitvoeren die van de geselecteerde pagina af komen
if(isset($bestanden)) {
	echo $bestanden;
}
unset($_SESSION['ingelogd']);
?>
</head>
<?php
echo "<body".(isset($bodyid) ? " id='".$bodyid."'" : "").">";
?>
<!-- <div id="wrapper"> -->
<?php
/* WRAPPER ***********************************************/
echo "<div id='wrapper'>";

/* HEADER ************************************************/
/* FORM */
if(isset($action_form_tag)) {
	echo $action_form_tag;
}
echo "<div id='header'>";
echo "<h1>".(isset($page) ? $page : "")."</h1>";
echo (isset($back_button) ? "<a href='".(isset($back_button_link) ? $back_button_link : "../")."' class='nav' id='backButton'>".$back_button."</a>" : "");
echo (isset($action_button) ? "<a href='".(isset($action_button_link) ? $action_button_link : "../")."' class='nav Action'>".$action_button."</a>" : "");
echo (isset($action_form_button_tag) ? $action_form_button_tag : "");
echo "</div>";

echo "<div id='page'>";
?>

<!-- <div class="button">Wedstrijden</div> -->
<!-- <div class="button-bold">Agenda</div> -->
<!-- <div id="menu"> -->
<?php if(empty($_SESSION['spelerId'])) { ?>
<!-- Inloggen -->
<!--<form action="/session_functions/inloggen.php" method="post">
<ul class="iphone_look">
	<li class="arrow menu_trigger">Inloggen</li>
	<li class="menu"><label for="user">Gebruikersnaam: </label><input id="user" type="text" name="user"></li>
	<li class="menu"><label for="password">Wachtwoord: </label><input id="password" type="password" name="password"></li>
	<li class="menu"><span class="button"><input class="button" type="submit" value="Inloggen"></span> <input id="remember" class="checkbox" type="checkbox" name="remember" value="yes"><label for="remember"> Onthouden</label></li>
</ul>
</form> -->
<?php }else {?>
<!-- Het naviagtie deel voor als je ingelogd bent -->
<!-- <ul class="iphone_look">
	<li class="arrow menu_trigger">Pagina's</li>
	<li class="menu"><a href="/">Home</a></li>
	<li class="menu"><a href="/schema/">Wedstrijdschema</a></li>
	<li class="menu"><a href="/team/">Team</a></li>
	<!-- <li class="menu"><a href="/stats/">Statistieken</a></li> -->
	<!-- <li class="menu"><a href="/kalender/">Kalender</a></li> -->
	<!-- <li class="menu"><a href="/extra/video/">Foto's & Video's</a></li> -->
	<!-- <li class="menu"><a href="/session_functions/uitloggen.php">Uitloggen</a></li>
</ul> -->
<?php } ?>
<!-- </div> -->
<!-- <div id="page"> -->